from typing import Sequence, TypeVar, Union, Dict


# 数据格式构造器
async def success(data) -> Dict:
    return {"code": 200, "data": data, "msg": ""}


async def error(code: int, msg: str) -> Dict:
    return {"code": code, "data": None, "msg": msg}
